<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>LoveTemperature</title>
		<meta name="author" content="ningzero"/>

		<!-- CSS -->
		<link rel="stylesheet" href="../css/orderManageOne.css">
		<!-- end CSS-->

	</head>

	<body>

		<div id="container">
			<header class="header">
				<div id="login_cart_bar">
					<div id="loginRegisterDiv">
						您好，<s:property value="#session.user.name" />
						<a class="pinkAnchor" href="http://localhost:8080/lovetemperature/sale/logout">退出登录</a>
					</div>
					<div id="cartAccountDiv">
						<a class="pinkAnchor" onclick='javascript:window.location="http://localhost:8080/lovetemperature/shop/editStaff"'>我的页面</a>
					</div>
				</div>
				<div id="logo_bar">
					<img src="../img/logo.gif"/>
					<img id="logo_text" src="../img/logo2.png"/>
				</div>
				<div id="nav_bar">
					<ul>
						<li class="nav_padding_left"></li>
						<li class='shouye' >
							<a href="http://localhost:8080/lovetemperature/shop/showOrders">订单管理</a>
						</li>
						<li class='dangao' >
							<a href="http://localhost:8080/lovetemperature/shop/showGood">产品管理</a>
						</li>
					</ul>
				</div>
			</header>
			<div id="mainContent" class="mainContent">
				<div id="extraInfoDiv">
					<h4>订单信息</h4>
					<p>订单号：<span><s:property value="#order.orderNum"/></span></p>
					<p>下单日期：<span><s:property value="#order.putOrderDate"/></span></p>
					<p>取货日期：<span><s:property value="#order.pickupDate"/></span></p>
					
					<h4>顾客信息</h4>
					<p>姓名：<span><s:property value="#order.customer.name"/></span></p>
					<p>联系电话：<span><s:property value="#order.phone"/></span></p>
					<h4>订购商品</h4>
				</div>
				<div id="goodsListDiv">
					<table>
						<thead>
							<tr>
								<th>商品名称</th>
								<th>单价</th>
								<th>数量</th>
								<th>小计</th>
							</tr>
						</thead>
						<tbody>
							<!-- 购物车中一件商品begin -->
							<s:iterator value="#order.goodSet" status="st">
							<tr>
								<td class="cartName"><s:property value="good.name"/></td>
								<td class="cartPrice">￥<s:property value="good.price"/></td>
								<td class="cartCount"><s:property value="count"/></td>
								<td class="cartTotalPrice">￥<s:property value="totalPrice"/></td>
							</tr>
							</s:iterator>
							<!-- 购物车中一件商品end -->
						</tbody>
					</table>
				</div>
				<div id="TotalPriceDiv">
					<p>订单总额：<span class="price">￥<s:property value="#order.totalPrice"/></span></p>
				</div>
				<div id="payDiv">
					<div class="normalBtn">删除订单</div>
					<div class="normalBtn" onclick="editOrder(<s:property value="orderNum"/>)">修改订单</div>
					<div class="normalBtn" onclick="javascript:history.back(-1);">返回</div>
					<div class="normalBtn" onclick="finish(<s:property value="orderNum"/>)">完成销售</div>
				</div>
			</div>
		</div>
		<!--! end of #container -->
		
		<footer id="footer">
			<img src="../img/tmp/tmpfooter.png" />
		</footer>

		<!-- scripts -->
		<script type="text/javascript" src="../js/libs/jquery-1.9.1.min.js" ></script>
		<script type="text/javascript" src="../js/index.js" ></script>
		<script>
			function editOrder(orderNum){
				window.location="http://localhost:8080/lovetemperature/shop/editOrder?orderNum="+orderNum;
			}
			function finish(orderNum){
				window.location="http://localhost:8080/lovetemperature/shop/finishOrder?orderNum="+orderNum;
			}
		</script>
		<!-- end scripts-->
	</body>
</html>
